{include file="admin/top.php" subject='products'}
{include file="products/top.php" subject='classes'}
<div id="content">
	<div id="tip">
    	{if 0}<span class="fr">{classes parentid=$segment.1|default:0 order=ordersn} &gt; <a href="{$site_admin}classes/{$classes.id}">{$classes.title}</a>{/classes}</span>
    	位置: <a href="{$site_admin}classes" onmouseover="classes_open(this, 'classes', '0')">根目录</a>
    	{section name=id loop=$paths} &gt; <a href="{$site_admin}classes/{$paths[id].id}" onmouseover="classes_open(this, 'classes', '{$paths[id].id}')">{$paths[id].title}</a>{/section}{/if}
	</div>
    
    <form method="post">
    <table width="100%" border="0" cellspacing="0" cellpadding="5" id="lister">
      <tr id="title">
        <td width="40">编号</td>
        <td width="60">顺序</td>
        <td>姓名</td>
        <td>&nbsp;</td>
      </tr>
      {classes limit=100 pager=pager parentid=0 order=ordersn}
      <tr id="content">
        <td>{$classes.id}</td>
        <td><input name="ordersn[{$classes.id}]" type="text" value="{$classes.ordersn}" size="2" /></td>
        <td><a href="{$site_admin}m=inventory&s=classes.php&uri=create&id={$classes.id}">{$classes.title}</a></td>
        <td align="right">
			{rights right='classes_remove'}<a href="{$site_admin}m=inventory&s=classes.php&uri=remove&id={$classes.id}" onclick="return confirm('删除产品目录同时删除子目录, 且数据不可恢复, 确定删除?')">删除</a>{/rights}
        	{rights right='classes_modify'}<a href="{$site_admin}m=inventory&s=classes.php&uri=modify&id={$classes.id}">编辑</a>{/rights}
        </td>
      </tr>
      {foreach from=$sub_class item=item key=key}
            <tr id="content">
        <td>{$item.id}</td>
        <td><input name="ordersn[{$item.id}]" type="text" value="{$item.ordersn}" size="2" /></td>
        <td>|——<a href="{$site_admin}m=inventory&s=classes.php&uri=create&id={$item.id}">{$item.title}</a></td>
        <td align="right">
			{rights right='classes_remove'}<a href="{$site_admin}m=inventory&s=classes.php&uri=remove&id={$item.id}" onclick="return confirm('删除产品目录同时删除子目录, 且数据不可恢复, 确定删除?')">删除</a>{/rights}
        	{rights right='classes_modify'}<a href="{$site_admin}m=inventory&s=classes.php&uri=modify&id={$item.id}">编辑</a>{/rights}
        </td>
      </tr>
        {foreach from=$sub_sub_class item=sub_item key=sub_key}
            <tr id="content">
        <td>{$sub_item.id}</td>
        <td><input name="ordersn[{$sub_item.id}]" type="text" value="{$sub_item.ordersn}" size="2" /></td>
        <td>|——<a href="{$site_admin}m=inventory&s=classes.php&uri=create&id={$sub_item.id}">{$sub_item.title}</a></td>
        <td align="right">
			{rights right='classes_remove'}<a href="{$site_admin}m=inventory&s=classes.php&uri=remove&id={$sub_item.id}" onclick="return confirm('删除产品目录同时删除子目录, 且数据不可恢复, 确定删除?')">删除</a>{/rights}
        	{rights right='classes_modify'}<a href="{$site_admin}m=inventory&s=classes.php&uri=modify&id={$sub_item.id}">编辑</a>{/rights}
        </td>
      </tr>
      {/foreach}
      
      {/foreach}
      {/classes}
      {if $pager->rows==0}
  	  <tr id="content">
        <td colspan="20">&nbsp;</td>
      </tr>
      {/if}
    </table>

    {rights right='classes_modify'}
    <div class="fr mt10">
    <input type="submit" value="更新显示顺序" class="btn" />
    <input name="action" type="hidden" id="action" value="index" />
    </div>
    {/rights}
    </form>
    
    <p>&nbsp;</p>
    <ul id="addmenu">
    	{rights right='classes_create'}<li><a href="{$site_admin}m=inventory&s=classes.php&uri=create">添加一个新的负责人</a></li>{/rights}
        {if 0}{rights right='classes_create|classes_modify|classes_remove'}<li><a href="{$site_admin}m=inventory&s=classes.php&uri=recaches">更新产品分类的显示顺序</a></li>{/rights}{/if}
    </ul>
</div>
{include file="admin/bottom.php"}
</body>
</html>
